package com.hexiang.service.impl;

import com.hexiang.entity.User;
import com.hexiang.service.NoticeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

@Component
@Slf4j
public class NoticeServiceImpl implements NoticeService {

    @Override
    @Transactional(rollbackFor = RuntimeException.class)
    public void notice(User user) {
        log.info("notice user:{} added", user);
        throw new RuntimeException("this is mock ");
    }
}